home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Games: 500 MB Amiga Software
/
500 MB Amiga Software - Euber 130 - Amiga Games Disc & Mag.iso
/
userbox
/
publicdomain
/
filer
/
rexx
/
xpk.filer
< prev
next >
Wrap
Text File
|
1995-04-03
|
2KB
|
102 lines
/*
$VER: XPK.filer 2.4 (2.4.95)
Author:
Matthias Scheler (tron@lyssa.owl.de)
Function:
All selected files and directories in the active directory listview will
be packed with XPK. If a compression method is supplied it will be used.
Else a string requester will appear and ask for the method.
History:
2.4 removed unnecessary ADDRESS 'FilerRexx'
Requires:
XPK 2.x or newer
xPack 1.x or newer
Call:
XPK [METHOD]
Example for "Filer.RC":
BUTTON ...,...,"Pack","RX XPK"
or:
BUTTON ...,...,"Nuke'em","RX XPK NUKE"
*/
PARSE ARG Compressor
OPTIONS RESULTS
LOCKFILER
IF RESULT="RESULT" THEN EXIT 5
Key=Result
PANEL OFF
'STATUS XPK compression'
IF Compressor="" THEN
DO
'SETSTRING NUKE'
'GETSTRING Enter XPK compression method:'
IF RESULT="RESULT" THEN
DO
PANEL ON
UNLOCKFILER Key
'STATUS XPK compression aborted'
EXIT 5
END
Compressor=RESULT
END
GETSOURCEPATH
IF RESULT="RESULT" THEN
DO
PANEL ON
UNLOCKFILER Key
EXIT 5
END
SourceDir=RESULT
GETNUMENTRIES
Num=RESULT
DO Index=1 TO Num
GETNAME Index
Data=RESULT
Name=SUBSTR(Data,2)
IF RIGHT(SourceDir,1)=":" THEN SourceName=SourceDir||Name
ELSE SourceName=SourceDir||"/"||Name
IF LEFT(Data,1)="f" THEN
DO
'EXEC xPack "'||SourceName||'" METHOD' Compressor 'ALL'
TOGGLEENTRY Index
'HISTORY "'||SourceName||'" compressed with method "'||Compressor||'".'
END
IF LEFT(Data,1)="d" THEN
DO
'EXEC xPack "'||SourceName||'" METHOD' Compressor 'ALL'
TOGGLEENTRY Index
'HISTORY Files in directory "'||SourceName||'" compressed with method "'||Compressor||'".'
END
END
UPDATESOURCEDIR
'STATUS Operation finished !'
PANEL ON
UNLOCKFILER Key